#ifndef GLOBALVAR_H
#define GLOBALVAR_H
#include <QString>
#include "game/sudoku/sudoku.h"
#include "game/gamelogic.h"
#include "mytime.h"
#include "commondef.h"

class   MainWindow;
class   TimeItem;
class   QTranslator;

class globalvar
{
public:
    globalvar();

    static QString name();
    static void setName(const QString &name);

    static int  level();
    static void setLevel(int l);
    static int  successNum();
    static void setSuccessNum(int n);
    static MyTime currentTime();
    static void setCurTime(const MyTime &mt);
    static MyTime levelTime(int l);
    static void setLevelTime(const MyTime &mt,int l);
    static int  completeNum();
    static void setCompleteNum(int n);
    static QString  levelDate(int l);
    static void setLevelDate(QString strdate,int l);
    static bool IsVoice();
    static void SetVoice(bool bvoice);
    static bool IsShowContinue();
    static void SetShowContinue(bool bshow);
    static void restoreChess(NUMTP numtparr[81],MyTime &mt,int &ipromat,
                             int &icurl,int &ierr);
    static void storeChess(NUMTP numtparr[81],const MyTime &mt,int ipromat,
                           int icurl,int ierr);

    static int              iCurlevel;
    static int              iwinNum;
    static sudoku           m_sudoku;
    static GameLogic        m_logic;
    static MainWindow       *m_mainwindow;
    static TimeItem         *m_timeitem;
    static QString          m_strfresh;
    static QString          m_strnormal;
    static QString          m_strmaster;
    static QString          m_strgun;
    static bool             m_bVoice;
    static QTranslator      *m_trans;
};

#endif // GLOBALVAR_H
